load("@rules_cc//cc:defs.bzl", "cc_library")

cc_library(
    name = "rsu_device",
    srcs = glob(
        [
            "standard_rsu/protocol/*.cc",
            "standard_rsu/*.cc",
            "example/*.cc",
            "*.cc",
        ]
    ),
    hdrs = glob(
        [
            "standard_rsu/protocol/*.h",
            "standard_rsu/*.h",
            "example/*.h",
            "*.h",
        ]
    ),
    deps = [
        "//base/device_connect/proto:rsu_data_cc_pb",
        "@yaml_cpp//:yaml_cpp",
        "@com_github_google_glog//:glog",
    ],
    linkopts = [
        "-pthread -lz -lrt",
    ],
    visibility = [
        "//visibility:public"
    ],
    linkstatic = False,
)

cc_test(
     name="rsu_ut",
     srcs = glob([
        "standard_rsu/protocol/*.cc",
        "standard_rsu/*.cc",
        "standard_rsu/protocol/*.h",
        "standard_rsu/*.h",
        "example/*.cc",
        "example/*.h",
        "*.cc",
        "*.h",
        "ut/rsu_test.cc",
    ]),
    linkopts = [
        "-pthread -lz"
    ],
     deps=[
        "@protobuf_import//:protobuf_import",
        "@com_google_googletest//:gtest_main",
        "//base/device_connect/proto:rsu_data_cc_pb",
        "@yaml_cpp//:yaml_cpp",
        "@com_github_google_glog//:glog",
     ]
)
